-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ET-VK] Organize utils #2323
Closed
Closed
[ET-VK] Organize utils #2323
+126
−105
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Refactor our `OpUtils.*`, `StagingUtils.*`, and `Utils.*` which have accumulated helper functions during the redesign. We split them and move them into two new folders: 1. `ops/utils`: Used by files in `ops/` and `ops/impl/`. 2. `ops/impl/utils`: Used only by files in `ops/impl/`. In general, this helps to unflatten the `ops/` directory: ``` [jorgep31415@devvm15882.vll0 /data/users/jorgep31415/fbsource/xplat/executorch/backends/vulkan/runtime/graph/ops (98b0e789c)]$ tree . ├── ExecuteNode.cpp ├── ExecuteNode.h ├── impl │ ├── Arithmetic.cpp │ ├── Arithmetic.h │ ├── Staging.cpp │ ├── Staging.h │ └── utils │ ├── DimUtils.h │ ├── ScalarUtils.h │ ├── TensorUtils.cpp │ └── TensorUtils.h ├── OperatorRegistry.cpp ├── OperatorRegistry.h ├── PrepackNode.cpp ├── PrepackNode.h └── utils ├── BindingUtils.cpp ├── BindingUtils.h ├── StagingUtils.cpp └── StagingUtils.h 3 directories, 18 files ``` Since we're heavily updating include declarations, we also introduce the convention to only include the VK-API via ``` #include <ATen/native/vulkan/api/api.h> ``` instead of including more specific files, e.g., ``` #include <ATen/native/vulkan/api/Tensor.h> ``` Differential Revision: [D54690346](https://our.internmc.facebook.com/intern/diff/D54690346/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/2323
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New FailuresAs of commit 2a96ea8 with merge base 0b6add8 (): NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
facebook-github-bot
added
the
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
label
Mar 8, 2024
This pull request was exported from Phabricator. Differential Revision: D54690346 |
jorgep31415
added a commit
that referenced
this pull request
Mar 8, 2024
Refactor our `OpUtils.*`, `StagingUtils.*`, and `Utils.*` which have accumulated helper functions during the redesign. We split them and move them into two new folders: 1. `ops/utils`: Used by files in `ops/` and `ops/impl/`. 2. `ops/impl/utils`: Used only by files in `ops/impl/`. In general, this helps to unflatten the `ops/` directory: ``` [jorgep31415devvm15882.vll0 /data/users/jorgep31415/fbsource/xplat/executorch/backends/vulkan/runtime/graph/ops (98b0e789c)]$ tree . ├── ExecuteNode.cpp ├── ExecuteNode.h ├── impl │ ├── Arithmetic.cpp │ ├── Arithmetic.h │ ├── Staging.cpp │ ├── Staging.h │ └── utils │ ├── DimUtils.h │ ├── ScalarUtils.h │ ├── TensorUtils.cpp │ └── TensorUtils.h ├── OperatorRegistry.cpp ├── OperatorRegistry.h ├── PrepackNode.cpp ├── PrepackNode.h └── utils ├── BindingUtils.cpp ├── BindingUtils.h ├── StagingUtils.cpp └── StagingUtils.h 3 directories, 18 files ``` Since we're heavily updating include declarations, we also introduce the convention to only include the VK-API via ``` #include <ATen/native/vulkan/api/api.h> ``` instead of including more specific files, e.g., ``` #include <ATen/native/vulkan/api/Tensor.h> ``` Differential Revision: [D54690346](https://our.internmc.facebook.com/intern/diff/D54690346/) ghstack-source-id: 217990425 Pull Request resolved: #2323
SS-JIA
approved these changes
Mar 8, 2024
This pull request has been merged in ac8267b. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
fb-exported
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
Refactor our
OpUtils.*
,StagingUtils.*
, andUtils.*
which have accumulated helper functions during the redesign.We split them and move them into two new folders:
ops/utils
: Used by files inops/
andops/impl/
.ops/impl/utils
: Used only by files inops/impl/
.In general, this helps to unflatten the
ops/
directory:Since we're heavily updating include declarations, we also introduce the convention to only include the VK-API via
instead of including more specific files, e.g.,
Differential Revision: D54690346